5
|
How do I put a picture on the control's background

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oScrollBar
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
oScrollBar:CLSID := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
oScrollBar:create(,, {10,60},{610,370} )
oScrollBar:Picture := oScrollBar:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oScrollBar:SetProperty("VisiblePart",640/*exBackgroundPart*/,.F.)
oScrollBar:SetProperty("BackColor",0x80000004)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
4
|
How can I change the size of control's font

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oScrollBar
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
oScrollBar:CLSID := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
oScrollBar:create(,, {10,60},{610,370} )
oScrollBar:Font():Size := 12
oScrollBar:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oScrollBar:SetProperty("Caption",256/*exThumbPart*/,"<img>0</img>thumb")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
3
|
How do I change the control's font

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oScrollBar
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
oScrollBar:CLSID := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
oScrollBar:create(,, {10,60},{610,370} )
oScrollBar:Font():Name := "Tahoma"
oScrollBar:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oScrollBar:SetProperty("Caption",256/*exThumbPart*/,"<img>0</img>thumb")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
2
|
How can I change the control's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oScrollBar
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
oScrollBar:CLSID := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
oScrollBar:create(,, {10,60},{610,370} )
oScrollBar:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oScrollBar:SetProperty("Caption",256/*exThumbPart*/,"<img>0</img>thumb")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
1
|
How can I change the control's background color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oScrollBar
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
oScrollBar:CLSID := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
oScrollBar:create(,, {10,60},{610,370} )
oScrollBar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,255,0 } ) , .F. ))
oScrollBar:SetProperty("VisiblePart",640/*exBackgroundPart*/,.F.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|